package com.crm.incoming.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.crm.incoming.mapper.CustIncomingInfoMapper;
import com.crm.incoming.domain.CustIncomingInfo;
import com.crm.incoming.service.ICustIncomingInfoService;

/**
 * 我的审件Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-02-03
 */
@Service
public class CustIncomingInfoServiceImpl implements ICustIncomingInfoService 
{
    @Autowired
    private CustIncomingInfoMapper custIncomingInfoMapper;

    /**
     * 查询我的审件
     * 
     * @param id 我的审件主键
     * @return 我的审件
     */
    @Override
    public CustIncomingInfo selectCustIncomingInfoById(Long id)
    {
        return custIncomingInfoMapper.selectCustIncomingInfoById(id);
    }

    /**
     * 查询我的审件列表
     * 
     * @param custIncomingInfo 我的审件
     * @return 我的审件
     */
    @Override
    public List<CustIncomingInfo> selectCustIncomingInfoList(CustIncomingInfo custIncomingInfo)
    {
        return custIncomingInfoMapper.selectCustIncomingInfoList(custIncomingInfo);
    }

    /**
     * 新增我的审件
     * 
     * @param custIncomingInfo 我的审件
     * @return 结果
     */
    @Override
    public int insertCustIncomingInfo(CustIncomingInfo custIncomingInfo)
    {
        custIncomingInfo.setCreateTime(DateUtils.getNowDate());
        return custIncomingInfoMapper.insertCustIncomingInfo(custIncomingInfo);
    }

    /**
     * 修改我的审件
     * 
     * @param custIncomingInfo 我的审件
     * @return 结果
     */
    @Override
    public int updateCustIncomingInfo(CustIncomingInfo custIncomingInfo)
    {
        custIncomingInfo.setUpdateTime(DateUtils.getNowDate());
        return custIncomingInfoMapper.updateCustIncomingInfo(custIncomingInfo);
    }

    /**
     * 批量删除我的审件
     * 
     * @param ids 需要删除的我的审件主键
     * @return 结果
     */
    @Override
    public int deleteCustIncomingInfoByIds(Long[] ids)
    {
        return custIncomingInfoMapper.deleteCustIncomingInfoByIds(ids);
    }

    /**
     * 删除我的审件信息
     * 
     * @param id 我的审件主键
     * @return 结果
     */
    @Override
    public int deleteCustIncomingInfoById(Long id)
    {
        return custIncomingInfoMapper.deleteCustIncomingInfoById(id);
    }
}
